-- GENERATED SPELL FOR [Devastation] --


function spell0_21269(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(36981,pUnit)
pUnit:RegisterEvent('Sorts_21269', 6000, 1)
end

function spell1_21269(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(36982,pUnit)
pUnit:RegisterEvent('Sorts_21269', 658, 1)
end

function Sorts_21269(pUnit, Event)
local choix_sorts_21269 = math.random(0, 1)
if choix_sorts_21269 == 0 then
pUnit:RegisterEvent('spell0_21269', 1, 1)
end
if choix_sorts_21269 == 1 then
pUnit:RegisterEvent('spell1_21269', 1, 1)
end
end

function mob21269_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21269', math.random(1500, 3000), 1)
end

function mob21269_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21269_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21269_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21269, 1, 'mob21269_Action')
RegisterUnitEvent(21269, 2, 'mob21269_Leave')
RegisterUnitEvent(21269, 3, 'mob21269_Kill')
RegisterUnitEvent(21269, 4, 'mob21269_Die')
